<?php

namespace app\index\controller;

use app\index\model\Book;
use think\Controller;
use think\Request;
use think\Session;

class Books extends Base {

    public function index(){
        return Book::all(['user_id'=>Session::get('user')['id']]);
    }

    public function read($id){
        return Book::get(['user_id'=>Session::get('user')['id'],'id'=>$id]);
    }

    public function save(){
    }



    public function update($id){
    }

    public function delete($id){
    }
}
